package com.situ.day19home;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Scanner;

import org.junit.Test;

public class Demo {
	@Test
	public void test1() {
		Scanner scanner = new Scanner(System.in);
		PreparedStatement preparedStatement = null;
		Connection connection = null;
		ResultSet resultSet = null;
		System.out.println("欢迎进入学生信息管理系统");
		System.out.println("请输入您需要的操作");
		System.out.println("----1.增加----");
		System.out.println("----2.删除----");
		System.out.println("----3.修改----");
		System.out.println("----4.查询----");
		System.out.println("----5.退出----");
		int num = scanner.nextInt();
		switch (num) {
		case 1:
			System.out.println("请输出需要增加的学生信息个数");
			int num1 = scanner.nextInt();
			ArrayList<Student> list = new ArrayList<>();
			for (int i = 1; i <= num1; i++) {
				System.out.println("请输入第" + i + "个学生的名字");
				String num2 = scanner.next();
				System.out.println("请输入第" + i + "个学生的年龄");
				int num3 = scanner.nextInt();
				System.out.println("请输入第" + i + "个学生的性别");
				String num4 = scanner.next();
				Student student = new Student( null,num2, num3, num4);
				list.add(student);
			}
			for (Student student : list) {
				System.out.println(student);
			}
			break;
        case 2:
			
			break;
        case 3:
	
	        break;
        case 4:
	
	        break;
        case 5:
	
	        break;

		default:
			break;
		}
	}

}
